<?php

namespace System\Model;

class Products {

    private $productId;
    private $productName;
    private $productLink;
    private $productDescription;
    private $productContent;
    private $productPrice;
    private $productQuanlity;
    private $productXuatXu;
    private $productBaoHanh;
    private $productSaleOff;
    private $productSaleOffDate;
    private $productUploadDate;
    private $productUpdateDate;
    private $productActive;
    private $catalogId;
    private $productStart;

    public function exchangeArray($data) {
        $this->productId = (isset($data["productId"])) ? $data["productId"] : null;
        $this->productName = (isset($data["productName"])) ? $data["productName"] : null;
        $this->productLink = (isset($data["productLink"])) ? $data["productLink"] : null;
        $this->productDescription = (isset($data["productDescription"])) ? $data["productDescription"] : null;
        $this->productContent = (isset($data["productContent"])) ? $data["productContent"] : null;
        $this->productPrice = (isset($data["productPrice"])) ? $data["productPrice"] : null;
        $this->productQuanlity = (isset($data["productQuanlity"])) ? $data["productQuanlity"] : null;
        $this->productXuatXu = (isset($data["productXuatXu"])) ? $data["productXuatXu"] : null;
        $this->productBaoHanh = (isset($data["productBaoHanh"])) ? $data["productBaoHanh"] : null;
        $this->productSaleOff = (isset($data["productSaleOff"])) ? $data["productSaleOff"] : null;
        $this->productSaleOffDate = (isset($data["productSaleOffDate"])) ? $data["productSaleOffDate"] : null;
        $this->productUploadDate = (isset($data["productUploadDate"])) ? $data["productUploadDate"] : null;
        $this->productUpdateDate = (isset($data["productUpdateDate"])) ? $data["productUpdateDate"] : null;
        $this->productActive = (isset($data["productActive"])) ? $data["productActive"] : null;
        $this->catalogId = (isset($data["catalogId"])) ? $data["catalogId"] : null;
        $this->productStart = (isset($data["productStart"])) ? $data["productStart"] : null;
    }

    public function getData() {
        $data = array();
        $data["productId"] = $this->productId;
        $data["productName"] = $this->productName;
        $data["productLink"] = $this->productLink;
        $data["productDescription"] = $this->productDescription;
        $data["productContent"] = $this->productContent;
        $data["productPrice"] = $this->productPrice;
        $data["productQuanlity"] = $this->productQuanlity;
        $data["productXuatXu"] = $this->productXuatXu;
        $data["productBaoHanh"] = $this->productBaoHanh;
        $data["productSaleOff"] = $this->productSaleOff;
        $data["productSaleOffDate"] = $this->productSaleOffDate;
        $data["productUploadDate"] = $this->productUploadDate;
        $data["productUpdateDate"] = $this->productUpdateDate;
        $data["productActive"] = $this->productActive;
        $data["catalogId"] = $this->catalogId;
        $data["productStart"] = $this->productStart;
        return $data;
    }

}
